<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form action="">
    输入：<input type="text" name="in1" id="in1"><br/>
    输出：<input type="button" name="out1" id="out1" value="无" disabled="disabled"><br/>
    <input type="button" value="提交" onclick="sub()">
    
</form>
<hr/><br/>
<form id="myform" >
    <h3>用户注册信息表</h3>
    <p><span>用户名：</span><input type="text" id="username" onblur="getUserName()"></p>
    <p><span>密码：</span><input type="password" id="pwd"></p>
    <div id="message"></div>
    <input type="reset" />&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="submit"/>
</form>

<script>
    var in1 = document.getElementById("in1");
    var out1 = document.getElementsByTagName("input")[1];
    function sub() {
        out1.value=in1.value;
    }

</script>
</body>
</html>